<template>
  <div></div>
  <!-- <p>{{ modelValue }}</p> -->
  <!-- <el-button @click="changeValue">子组件修改父组件数据</el-button> -->
</template>

<script setup lang="ts">
import { ref,defineExpose,defineProps,defineEmits,inject } from 'vue';


const childData = ref("子组件中的数据");
const childMethod = () => {
//   console.log("子组件中的方法");
};
defineExpose({ childData, childMethod }); // 子组件暴漏数据和方法
defineProps(['modelValue'])
const emit = defineEmits(['update:modelValue']) 
const changeValue = () => {
  emit('update:modelValue', '子组件修改父组件数据')
}
</script>

<style scoped lang="less">
</style>
